package com.dreamliner.lib.lame.sample;

import android.Manifest;
import android.app.Application;

import com.dreamliner.lib.frame.util.ConfigurationUtil;
import com.orhanobut.logger.AndroidLogAdapter;
import com.orhanobut.logger.Logger;

/**
 * Created by chenzj on 2017/7/4.
 */

public class AppContext extends Application {

    private static AppContext mInstance;

    public static AppContext getInstance() {
        return mInstance;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        mInstance = this;
        Logger.addLogAdapter(new AndroidLogAdapter());
        ConfigurationUtil.setIsDebug(true);
        ConfigurationUtil.init(this);
        ConfigurationUtil.initThemeColor();
        ConfigurationUtil.setPermissionArray(new String[]{
                //读写sd卡
                Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE,
                //录音
                Manifest.permission.RECORD_AUDIO
        });
    }
}
